package christ.mmd.bl;

import android.os.Parcel;
import android.os.Parcelable;
public enum Region implements Parcelable {
	None, World, Crimea, Cherkasy, Chernihiv, Chernivtsi, Dnipropetrovsk, Donetsk, IvanoFrankivsk, Kharkiv, Kherson, Khmelnytskyi, Kiev, Kirovohrad, Luhansk, Lviv, Mykolaiv, Odessa, Poltava, Rivne, Sumy, Ternopil, Vinnytsia, Volyn, Zakarpattia, Zaporizhia, Zhytomyr;
	public static Region valueOfEx(String name)
	{
		Region result = None;
		if(name != null && name.trim().length() > 0)
		{
			result = Region.valueOf(name.trim());
		}
		return result;		
	}
	
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(name());

	}

	public static final Parcelable.Creator<Region> CREATOR = new Parcelable.Creator<Region>() {
		public Region createFromParcel(Parcel in) {
			return Region.valueOfEx(in.readString());
		}

		public Region[] newArray(int size) {
			return new Region[size];
		}
	};
};
